# Created with pycharm
# author:ju bai
# Date:2021/7/20
# Time:9:43
from selenium import webdriver
import time
import os

driver = webdriver.Chrome()
# 本地HTML
url = "file:///"+os.path.abspath("D:/Python/selenium2html/checkbox.html")
driver.get(url)

inputs = driver.find_elements_by_tag_name("input")

# 判断为checkbox则选中
for input in inputs:
    if input.get_attribute('type') == 'checkbox':
        input.click()
time.sleep(6)
driver.quit()


